﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SuperX.Helper.Rule
{
    public class NotNullRule : IRule
    {
        public bool IsValidValue(object value, out string outMsg)
        {
            outMsg = string.Empty;
            if (value == null || value == DBNull.Value || string.IsNullOrEmpty(value?.ToString()))
            {
                outMsg = string.Format("值为空");
                return false;
            }
            return true;
        }
    }
}
